
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/xml_parser.hpp>
#include "config.h"

boost::property_tree::ptree Config::config_tree_;
uint16_t Config::kMaxMessageLength = UINT16_MAX;
uint8_t Config::kMaxServiceNameLength = UINT8_MAX;

void Config::Init(const std::string& config_file) {
  read_xml(config_file, config_tree_);
}

std::string Config::Get(const char* path) {
  return config_tree_.get<std::string>(path);
}

boost::property_tree::ptree& Config::GetTree(void) {
  return config_tree_;
}

